/* 定义初始数据 薪资模块 */
const state = {
  dialog: {
    show: false,
    data: [],
    obj: {},
    type: ""
  },
  postParams: {
    autoCheckHours: "",
    checkCount: "",
    companyId: "",
    feedbackCount: "",
    readCount: "",
    sendBy: "",
    salaryBillDOList: [],
    sendCount: "",
    sendName: "",
    sendType: "",
    showEmptyValue: false,
    tableId: "",
    withdrawStatus: "",
    withdrawnCount: ""
  },
  payslip: {
    successList: [],
    postParams: {},
    cbData: {},
    tableId: ""
  },
  salaryParams: {}
};
/* 同步提交 */
const mutations = {
  setSalaryparams(state, payload) {
    Object.assign(state.salaryParams, payload);
  },
  resetSalaryparams(state) {
    state.salaryParams = {};
  },
  DIALOGS(state) {},
  dialogs(state) {},
  successList(state, payload) {
    state.payslip.successList = payload;
  },
  postParams(state, payload) {
    Object.assign(state.payslip.postParams, payload);
  },
  cbData(state, payload) {
    state.payslip.cbData = payload;
  },
  tableId(state, payload) {
    state.payslip.tableId = payload;
  },
  resetPostParams(state) {
    state.payslip.postParams = {};
  },
  resetPayslip(state) {
    state.payslip = {};
  }
};
/* 异步提交 */
const actions = {};
const getters = {
  PAYSLIP: state => state.payslip,
  SALARY: state => state.salaryParams
};
export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
};
